import { PoolManager } from 'db://assets/Scripts/Framework/Managers/PoolManager';
import { InGameManager } from '../Managers/InGameManager';
import { Item } from './Item';

export class Pack extends Item {

    level: number;

    static Init(_num: number): Pack {
        let data = InGameManager.itemsJson.Pack[_num];
        let pack = PoolManager.GetItem(Pack);
        pack.num = 1;
        pack.itemName = data.name;
        pack.level = data.level;
        pack.sfUrl = data.spriteFrame;
        return pack;
    }

}